package com.vinfai.patterns.decorator;

/**
 * decorator patterns
 * 
 * @author vinfai
 *
 */
public class Client {
	
	public static void main(String[] args){
		Component comp = new ConcreteComponent();
		Component myd1 = new MyDecorator(comp);
		//myd1.doOperation("test");
		
		//多个装饰可包裹使用.所以也叫wrapper patterns
		Component myd2 = new MyDecorator2(myd1);
		myd2.doOperation("my decorator two ");
	}
}
